package com.budwk.app.sqfw.services;

import com.budwk.app.sqfw.models.Sqfw_cenSusPaper;
import com.budwk.app.sqfw.vo.SqfwCenSusPaperVo;
import com.budwk.starter.common.result.Result;
import com.budwk.starter.database.service.BaseService;
import org.nutz.dao.Cnd;
import org.nutz.mvc.upload.TempFile;

import java.util.List;
import java.util.Map;

/**
 * @program: wk-mini
 * @description: 人员信息服务
 * @author: LJT
 * @create: 2023-11-07 14:01
 **/
public interface SqfwPeopleInfoForAdminService extends BaseService<Sqfw_cenSusPaper> {

    /**
     * 获取导出Excel或pdf的id列表
     *
     * @param bean
     * @return
     */
    List<String> getPdfExcelFileDownSumIdList(Sqfw_cenSusPaper bean, String queryAll, String queryTime);

    /**
     * 组建巡查记录的查询条件
     *
     * @param bean
     * @param pageOrderName
     * @param pageOrderBy
     * @return
     */
    Cnd buildConditionForQueryToCnd(Sqfw_cenSusPaper bean, String queryAll, String queryTim, String pageOrderName, String pageOrderBy);


    /**
     * 生成Excel表格
     *
     * @param ids
     * @param fileIndex
     * @return
     */
    String createExcelAndUpload(List<String> ids, Integer fileIndex, String isCheckData, String startTime, String endTime);

    Result<?> importHouseholdData(TempFile file);

    void updateCenSusPaper(SqfwCenSusPaperVo paperVo);

    void insertCenSusPaper(SqfwCenSusPaperVo paperVo);

    String deleteById(String id);

    /**
     * 住户信息excel数据检查
     *
     * @param sumIdList  记录ID
     * @param queryAll   查询参数
     * @param bean       对象
     * @param queryEntry 查询入口
     * @param queryTime  查询时间
     * @return
     */
    List<Integer> checkParamFromHouseInfo(List<String> sumIdList, Sqfw_cenSusPaper bean, String queryAll, String queryTime, String queryEntry, String startTime, String endTime, Integer fileIndex);

    /**
     * 住户信息excel模板下载
     *
     * @param fileIndex 对应文件key
     * @return
     */
    String generatePeopleInfoTemplateDownload(Integer fileIndex);

    /**
     * app端根据条件查询辖区住户信息
     *
     * @param queryParam, selectParam
     * @return java.util.List<java.util.Map>
     * @author zhangp
     * @date 2024/1/9 11:46
     * @Version1.0
     */
    List<Sqfw_cenSusPaper> getPeopleInfoList(String queryParam, String selectParam, Integer pageSize, Integer pageNo);

    /**
     * app根据条件下载excel数据
     *
     * @param queryParam
     * @param selectParam
     * @param fileIndex
     * @param startTime
     * @param endTime
     * @return
     */

    String generatePeopleInfoExcelForAppByCond(String queryParam, String selectParam, Integer fileIndex, String isCheckData, String startTime, String endTime, List<String> ids);

    /**
     * app数据检测
     *
     * @param queryParam
     * @param selectParam
     * @return
     */
    List<Integer> checkParamFromHouseInfoForApp(String queryParam, String selectParam, String startTime, String endTime, Integer fileIndex);

    /**
     * 根据详细地址获取入户调查信息
     *
     * @param unitId
     * @param a15
     * @return
     */
    List<Map> getHouseSurveyInfoListByAddress(String unitId, String a15);
}
